package com.godyao.service.impl;

import com.godyao.mvcframework.annotations.Service;
import com.godyao.service.MyService;

import java.util.HashMap;
import java.util.Map;

@Service
public class MyserviceImpl implements MyService {
    private static Map<Integer, String> map;

    static {
        map = new HashMap<>();
        map.put(1, "张三");
        map.put(2, "李四");
        map.put(3, "王武");
    }

    @Override
    public String getNameById(Integer id) {
        return map.get(id);
    }
}
